/***************************************************************************
                           paths.c  -  description
                             -------------------
    begin             : 08.04.2008
    copyright         : (C) 2008 by MHS-Elektronik GmbH & Co. KG, Germany
    autho             : Klaus Demlehner, klaus@mhs-elektronik.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software, you can redistribute it and/or modify  *
 *   it under the terms of the GNU Lesser General Public License           *
 *   version 2.1 as published by the Free Software Foundation.             *
 *                                                                         *
 ***************************************************************************/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <glib/gstdio.h>
#include "gtk_util.h"
#include "paths.h"


struct TPaths Paths;



void PathsInit(gchar *prog)
{
Paths.base_dir = g_path_get_dirname(prog);
Paths.setup_dir = g_strdup(Paths.base_dir);
//Paths.plugin_dir = g_build_filename(Paths.base_dir, "plugins", NULL);; 
//Paths.locale_dir = g_build_filename(Paths.base_dir, "locale", NULL);
g_chdir(Paths.base_dir);
}


void PathsFree(void)
{
save_free(Paths.base_dir);
//save_free(Paths.plugin_dir);
save_free(Paths.setup_dir);
//save_free(Paths.locale_dir);
}
